home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / clx.lha / clx / defsystem.l < prev    next >
Text File  |  1988-09-12  |  9KB  |  282 lines

  1. ;;; -*- Mode: LISP; Syntax: Common-lisp; Package: USER; Base: 10; Lowercase: Yes -*-
  2.  
  3. ;;;
  4. ;;;             TEXAS INSTRUMENTS INCORPORATED
  5. ;;;                  P.O. BOX 2909
  6. ;;;                   AUSTIN, TEXAS 78769
  7. ;;;
  8. ;;; Copyright (C) 1987 Texas Instruments Incorporated.
  9. ;;;
  10. ;;; Permission is granted to any individual or institution to use, copy, modify,
  11. ;;; and distribute this software, provided that this complete copyright and
  12. ;;; permission notice is maintained, intact, in all copies and supporting
  13. ;;; documentation.
  14. ;;;
  15. ;;; Texas Instruments Incorporated provides this software "as is" without
  16. ;;; express or implied warranty.
  17. ;;;
  18.  
  19. ;;; NOTE: This is beta code.  There are various known problems (e.g.,
  20. ;;; various cases of gcontext shadowing, bullet-proof abort handling),
  21. ;;; and various features (e.g., less restrictive locking) being thought
  22. ;;; about.  Bug reports should be addressed to
  23. ;;; bug-clx@zermatt.lcs.mit.edu.
  24.  
  25. ;; Note: File mode-lines don't have:
  26. ;;    PACKAGE: (XLIB :USE (CL))
  27. ;;  because the TI Explorer doesn't fully support it.
  28. ;;  Define the XLIB package here instead.
  29.  
  30. (unless (find-package "XLIB")
  31.   (make-package "XLIB" :use '("LISP")))
  32.  
  33. #+(and lispm (not genera))
  34. (defsystem CLX
  35.   (:pathname-default "clx:clx;")
  36.   (:patchable "clx:patch;" clx-ti)
  37.   (:initial-status :experimental)
  38.  
  39.   (:module depdefs "depdefs")
  40.   (:module clx "clx")
  41.   (:module dependent "dependent")
  42.   (:module macros "macros")
  43.   (:module bufmac "bufmac")
  44.   (:module buffer "buffer")
  45.   (:module display "display")
  46.   (:module gcontext "gcontext")
  47.   (:module requests "requests")
  48.   (:module input "input")
  49.   (:module fonts "fonts")
  50.   (:module graphics "graphics")
  51.   (:module text "text")
  52.   (:module attributes "attributes")
  53.   (:module translate "translate")
  54.   (:module keysyms "keysyms")
  55.   (:module manager "manager")
  56.   (:module image "image")
  57.   (:module resource "resource")
  58.   (:module doc "doc")
  59.  
  60.   (:compile-load depdefs)
  61.   (:compile-load clx
  62.    (:fasload depdefs))
  63.   (:compile-load dependent
  64.    (:fasload depdefs clx))
  65.   ;; Macros only needed for compilation
  66.   (:skip :compile-load macros
  67.    (:fasload depdefs clx dependent))
  68.   ;; Bufmac only needed for compilation
  69.   (:skip :compile-load bufmac
  70.    (:fasload depdefs clx dependent macros))
  71.   (:compile-load buffer
  72.    (:fasload depdefs clx dependent macros bufmac))
  73.   (:compile-load display
  74.    (:fasload depdefs clx dependent macros bufmac buffer))
  75.   (:compile-load gcontext
  76.    (:fasload depdefs clx dependent macros bufmac buffer display))
  77.   (:compile-load requests
  78.    (:fasload depdefs clx dependent macros bufmac buffer display))
  79.   (:compile-load input
  80.    (:fasload depdefs clx dependent macros bufmac buffer display))
  81.   (:compile-load fonts
  82.    (:fasload depdefs clx dependent macros bufmac buffer display))
  83.   (:compile-load graphics
  84.    (:fasload depdefs clx dependent macros fonts bufmac buffer display fonts))
  85.   (:compile-load text
  86.    (:fasload depdefs clx dependent macros fonts bufmac buffer display gcontext fonts))
  87.   (:compile-load-init attributes
  88.    (dependent)                    ;<- There may be other modules needed here.
  89.    (:fasload depdefs clx dependent macros bufmac buffer display))
  90.   (:compile-load translate
  91.    (:fasload depdefs clx dependent macros bufmac buffer display))
  92.   (:compile-load keysyms
  93.    (:fasload depdefs clx dependent macros bufmac buffer display translate))
  94.   (:compile-load manager
  95.    (:fasload depdefs clx dependent macros bufmac buffer display))
  96.   (:compile-load image
  97.    (:fasload depdefs clx dependent macros bufmac buffer display))
  98.   (:compile-load resource)
  99.   (:auxiliary doc)
  100.   )
  101.  
  102.  
  103. #+genera
  104. (defsystem CLX
  105.     (:default-pathname "CLX:CLX;"
  106.      :default-package "XLIB"
  107.      :pretty-name "CLX"
  108.      :distribute-binaries t
  109.      :bug-reports ("CLX" "Report problems with CLX.")
  110.      :initial-status :experimental)
  111.   (:module doc ("doc")
  112.        (:type :lisp-example))
  113.   (:module depdefs ("depdefs"))
  114.   (:module clx ("clx")
  115.        (:uses-definitions-from depdefs))
  116.   (:module dependent ("dependent")
  117.        (:uses-definitions-from clx))
  118.   (:module macros ("macros")
  119.        (:root-module nil)
  120.        (:uses-definitions-from dependent))
  121.   (:module bufmac ("bufmac")
  122.        (:root-module nil)
  123.        (:uses-definitions-from macros))
  124.   (:module buffer ("buffer")
  125.        (:in-order-to :compile (:load macros))
  126.        (:in-order-to :compile (:load bufmac)))
  127.   (:module display ("display")
  128.        (:in-order-to :compile (:load macros))
  129.        (:in-order-to :compile (:load bufmac))
  130.        (:in-order-to :compile (:load buffer)))
  131.   (:module gcontext ("gcontext")
  132.        (:in-order-to :compile (:load macros))
  133.        (:in-order-to :compile (:load bufmac))
  134.        (:uses-definitions-from display))
  135.   (:module requests ("requests")
  136.        (:in-order-to :compile (:load macros))
  137.        (:in-order-to :compile (:load bufmac))
  138.        (:uses-definitions-from display))
  139.   (:module input ("input")
  140.        (:in-order-to :compile (:load macros))
  141.        (:in-order-to :compile (:load bufmac))
  142.        (:uses-definitions-from display))
  143.   (:module fonts ("fonts")
  144.        (:in-order-to :compile (:load macros))
  145.        (:in-order-to :compile (:load bufmac))
  146.        (:uses-definitions-from display))
  147.   (:module graphics ("graphics")
  148.        (:in-order-to :compile (:load macros))
  149.        (:in-order-to :compile (:load bufmac))
  150.        (:uses-definitions-from fonts))
  151.   (:module text ("text")
  152.        (:in-order-to :compile (:load macros))
  153.        (:in-order-to :compile (:load bufmac))
  154.        (:uses-definitions-from gcontext fonts))
  155.   (:module attributes ("attributes")
  156.        (:in-order-to :compile (:load macros))
  157.        (:in-order-to :compile (:load bufmac))
  158.        (:uses-definitions-from display))
  159.   (:module translate ("translate")
  160.        (:in-order-to :compile (:load macros))
  161.        (:in-order-to :compile (:load bufmac))
  162.        (:uses-definitions-from display))
  163.   (:module keysyms ("keysyms")
  164.        (:uses-definitions-from translate))
  165.   (:module manager ("manager")
  166.        (:in-order-to :compile (:load macros))
  167.        (:in-order-to :compile (:load bufmac))
  168.        (:uses-definitions-from display))
  169.   (:module image ("image")
  170.        (:in-order-to :compile (:load macros))
  171.        (:in-order-to :compile (:load bufmac))
  172.        (:uses-definitions-from display))
  173.   (:module resource ("resource"))
  174.   )
  175.  
  176. #+lucid
  177. (defvar *foreign-libraries* '("-lc")) ; '("-lresolv" "-lc") for some sites
  178.  
  179. #+lucid
  180. (defun clx-foreign-files ()
  181.   #-lcl3.0 (load "make-sequence-patch")
  182.   #+apollo
  183.   (define-foreign-function '(xlib::connect-to-server "connect_to_server")
  184.     '((:val host    :string)
  185.       (:val display :integer32))
  186.     :integer32)
  187.   #-apollo
  188.   (define-c-function (xlib::connect-to-server "_connect_to_server")
  189.              (host display)
  190.              :result-type :integer)
  191.   (unintern 'display)
  192.   #+apollo
  193.   (load-foreign-file "socket" :preserve-pathname t)
  194.   #-apollo
  195.   (load-foreign-files '("socket.o") *foreign-libraries*))
  196.  
  197. #-lispm
  198. (defun compile-clx (&optional pathname-defaults)
  199.   (let ((*default-pathname-defaults*
  200.       (or pathname-defaults *default-pathname-defaults*)))
  201.     (declare (special *default-pathname-defaults*))
  202.     #+lucid
  203.     (clx-foreign-files)
  204.     #+kcl
  205.     (load "tcp/tcpinit")
  206.     #+excl
  207.     (progn
  208.       (compile-file "excldep")
  209.       (load "excldep"))
  210.     (compile-file "depdefs")
  211.     (load "depdefs")
  212.     (compile-file "clx")
  213.     (load "clx")
  214.     (compile-file "dependent")
  215.     (load "dependent")
  216.     (compile-file "macros")
  217.     (load "macros")
  218.     (compile-file "bufmac")
  219.     (load "bufmac")
  220.     (compile-file "buffer")
  221.     (load "buffer")
  222.     (compile-file "display")
  223.     (load "display")
  224.     (compile-file "gcontext")
  225.     (load "gcontext")
  226.     (compile-file "requests")
  227.     (load "requests")
  228.     (compile-file "input")
  229.     (load "input")
  230.     (compile-file "fonts")
  231.     (load "fonts")
  232.     (compile-file "graphics")
  233.     (load "graphics")
  234.     (compile-file "text")
  235.     (load "text")
  236.     (compile-file "attributes")
  237.     (load "attributes")
  238.     (compile-file "translate")
  239.     (load "translate")
  240.     (compile-file "keysyms")
  241.     (load "keysyms")
  242.     (compile-file "manager")
  243.     (load "manager")
  244.     (compile-file "image")
  245.     (load "image")
  246.     (compile-file "resource")
  247.     (load "resource")
  248.     ))
  249.  
  250. #-lispm
  251. (defun load-clx (&optional pathname-defaults macros-p)
  252.   (let ((*default-pathname-defaults*
  253.       (or pathname-defaults *default-pathname-defaults*)))
  254.     (declare (special *default-pathname-defaults*))
  255.     #+lucid
  256.     (clx-foreign-files)
  257.     #+kcl
  258.     (load "tcp/tcpinit")
  259.     #+excl
  260.     (load "excldep")
  261.     (load "depdefs")
  262.     (load "clx")
  263.     (load "dependent")
  264.     (when macros-p
  265.       (load "macros")
  266.       (load "bufmac"))
  267.     (load "buffer")
  268.     (load "display")
  269.     (load "gcontext")
  270.     (load "requests")
  271.     (load "input")
  272.     (load "fonts")
  273.     (load "graphics")
  274.     (load "text")
  275.     (load "attributes")
  276.     (load "translate")
  277.     (load "keysyms")
  278.     (load "manager")
  279.     (load "image")
  280.     (load "resource")
  281.     ))
  282.